Skip to main content

Update Document Type

PUT : http://<base_url>/digipay/v3/user/document_type

This API is used to update new document type into the system

BODY PARAMS:-

ParameterTypeDescriptionValue
idStringUnique id assign to document retrive a document type detail.da65da5sd6a5dsa56d
document_type_titleStringThe title or name of the document type, such as ""Passport"" or ""Driver's License.selfish
document_user_typeIntRepresents the user type associated with the document, like different roles or permissions2
document_side_typeIntDenotes the type of document side (front, back, both) that is being referred to.1
is_mandatoryBooleanA boolean flag indicating whether the document is mandatory.true/false
document_extra_fieldsArray of StringsAn array of additional fields or information related to the document."business_types": ["[\"\"type1\"\"","\"\"type2\"\"]"]
document_typeIntRepresents the type or classification of the document.1
document_categoryIntDenotes the category to which the document belongs.2
dynamic_category_keyStringA key that dynamically links documents to specific categories.dynamic_key
business_typesArray of StringsA list of business types associated with the document.[

"[\"\"type1\"\"", "\"\"type2\"\"]" ] |
| expiry_date_required | Boolean | A boolean flag indicating whether an expiry date is required for the document."| true/false |

HEADERS:-

ParameterTypeDescriptionValue
AuthorizationStringIt is a combination of type and token to authenticate user for the given tokenToken duik7309njdlkhdauhknksadhjkas986876sd873j
CompanyIDStringCompany_id is a unique primary id, that is represent company detail76bc712200ca444fa334f9e55e5fd7a8

Request Body:-

Request Example
curl --request PUT \
--url http://192.168.1.102:8014/digipay/v3/user/document_type \
--header 'Authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI2NWY0ZDI1MDliZmU0NTBmYTg4MTVhNTU5Njk3YmM0NyIsInJvbGVzIjpbIlJPTEVfQURNSU4iXSwiZXhwIjoxNjkzNTIxOTU1fQ.9oWwUzlFzmYB1ZOhaVamxKJH6DsMO8tFue2kbg2YyoI' \
--header 'CompanyID: 76bc712200ca444fa334f9e55e5fd7a8' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"id": "da65da5sd6a5dsa56d",
"document_type_title": "selfish",
"document_user_type": 2,
"document_side_type": 1,
"is_mandatory": false,
"document_extra_fields": [
"[\"\"field1\"\"",
"\"\"field2\"\"]"
],
"document_type": 2,
"document_category": 2,
"dynamic_category_key": "dynamic_key",
"business_types": [
"[\"\"type1\"\"",
"\"\"type2\"\"]"
],
"expiry_date_required": false
}
'

Response:-

Response 200(OK)

{
"success": 1,
"error": [],
"data": {
"message": "Document type detail updated successfully."
}
}
Response 400(BAD REQUEST)
{
"success": 0,
"error"": [1],
"data": {
"message": "BAD_REQUEST",
}
}

RESPONSES :-

Status CodeDescription
200OK
400Bad Request
404Not Found
500Internal Server Error